package com.farmpost.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author king
 * @since 2022-04-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Comment对象", description="评论表")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "主题id")
    private Integer topicId;

    @ApiModelProperty(value = "主题type")
    private String topicType;

    @ApiModelProperty(value = "评论内容")
    private String content;

    @ApiModelProperty(value = "评论用户id")
    private Integer fromUid;

    @ApiModelProperty(value = "评论获得赞数")
    private Integer greatCount;

    @ApiModelProperty(value = "评论时间")
    private LocalDateTime dateTime;

    @ApiModelProperty(value = "评论是否审核")
    private Boolean commentStatus;

    @ApiModelProperty(value = "评论用户")
    @TableField(exist = false)
    private UserInfo userInfo;

    @ApiModelProperty(value = "回复数量")
    @TableField(exist = false)
    private Integer replyCount;

    @ApiModelProperty(value = "是否删除")
    @TableLogic
    private Integer deleted;

    @TableField(exist = false)
    private Boolean inputShow;

    @TableField(exist = false)
    private List<ReplyComment> reply;
}
